package com.yubest.demo;

import cn.hutool.http.HttpUtil;

/**
 * 针对web页面缓存的m4a文件进行下载
 * @Author hweiyu
 * @Description
 * @Date 2021/2/25 17:17
 */
public class WebCommand implements Command {

    @Override
    public void execute(Context context) {
        if (!isValidContext(context)) {
            System.out.println("url为空");
            return;
        }
        try {
            HttpUtil.downloadFile(context.getInPath(), context.getOutPath());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
